Field
Embodiments of the present invention generally relate to the field of load balancing. More particularly, embodiments of the present invention relate to rule-based processing of a Hypertext Transfer Protocol (HTTP) cache of an Application Delivery Controller (ADC) to efficiently process incoming HTTP requests based on HTTP header information collected by the ADC.
Description of the Related Art
Existing web-based applications/solutions allow users to visit a website using a variety of web browsers, e.g., Internet Explorer, Mozilla Firefox, Google Chrome and Apple Safari, etc., that may be installed on a variety of devices, e.g., computer, laptop, mobile phones, tablets, PDAs, etc., that may run different operating systems, e.g., Windows, Mac, Unix, Linux, Android, etc. Meanwhile, each browser or operating system can have different versions.
A cookie is a small piece of data sent from a website and stored in a user's web browser intended to facilitate interactions with the website. Every time the user visits the website, the browser sends the cookie back to the server to notify the website, for example, of the user's identify, the user's previous activity on the website and the like. There are two different types of cookies, namely, session cookies and persistent cookies. Session cookies are temporary cookies and are deleted when the user closes the browser. As such, when the user visits that particular website again, the website will not recognize the user and will treat him/her as a new user, whereas, persistent cookies remain stored on the user's system for a period defined by the browser preferences such that when the user visits that particular website again, the server hosting the website is able to customize that user's experience in one or more ways based on the persistent information.
Caching is widely used to increase performance by keeping frequently accessed data in a memory, for example, of a client device, an ADC or a server. In the context of web applications, caching helps retain pages and/or data across HTTP requests and facilitates efficient reuse of same thereby taking some load off of web and/or application servers. Each page specifies settings within the page that define whether and how the page is cached. These settings include: cache duration, how multiple variants are constructed based on client input, and various settings controlling proxy and client caching of the returned response. Discovering and managing these settings requires each page to be inspected individually, which quickly becomes a problem on sites having a large amount of content.
Web sites (e.g., large commercial web-sites) receiving large amounts of traffic (e.g., connection requests) typically have a number of servers. Infrastructure supporting such web sites often includes a load balancing device, commonly referred to as an Application Delivery Controller (ADC), which is typically logically interposed between the firewall and the servers in the data-center. An ADC may route user requests to destination servers based on a variety of criteria that the datacenter manager implements using policies and advanced application-layer knowledge to support business requirements.
When a user requests a web page, for example, the browser sends out the request as an HTTP request, which reaches the ADC at the data center. The ADC parses the HTTP request and forwards it to an appropriate server. The server processes the request and responds with a document transmitted in the form of an HTTP response message directed to the requester. The browser then parses the HTTP response, interprets it and renders the document. The response document may be HTML, which may contain references to additional resources such as images, JavaScript files, cascade style sheet (CSS) files, media files, among others. In this case, the browser issues additional requests for these resources. Each request results in one round trip. It is fairly typical for today's web pages to require over 100 round trips. Eventually all these resources are loaded, the browser fully renders the page and the web page is ready for user interaction.
In order to improve the performance of resource retrieval and presentation, ADCs may include a cache that stores one or more responses from servers such that when future requests for corresponding resources arrive from one or more users, cached responses can be forwarded to the client devices of the users. However, for such architectures to work, the HTTP requests and parameters mentioned therein such as in their header fields including cookie values have to match the cached data. For example, existing architectures allow storage of server identifier information of servers from which the responses are received in the cache of the ADC, say in the form of cookie information such as Insert cookie “ADC=Server-2” (indicating that the response came from server 2), which allow the ADC to detect and direct the next HTTP request from a user for the same web resource to Server 2 based on this cookie information. Although the approach allows an ADC to efficiently identify a server to which to direct the request, it does not offload the server. Even with the incorporation of an HTTP cache within an ADC, existing architectures do not provide any means to allow efficient use of cached resources. For example, when using the “Vary” header specified by Request for Comments (RFC) 2616, which is hereby incorporated by reference in its entirety for all purposes, the whole header is specified, therefore minor differences in the header, as a result, for example, of a different user making a request for the same content, cause false cache misses.
There is therefore a need in the art for systems and methods that efficiently combine HTTP caching and ADC load balancing in order to reduce resource utilization of an HTTP cache and achieve higher performance caching.